﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using Resto.CostControl.Core.Models;

namespace Resto.CostControl.Core
{
    /// <summary>
    /// 菜肴的原材料或半成品
    /// </summary>
    public class Material : BaseModel
    {
        public string Id { get; set; }

        [Display(Name = "品名编号")]
        public string Code { get; set; }

        [Display(Name = "品名名称")]
        public string Name { get; set; }

        [Display(Name = "品名单位")]
        public string Unit { get; set; }

        [Display(Name = "品名规格")]
        public string Specification { get; set; }

        /// <summary>
        /// 当前价格(原材料的价格是从供应商是输入的，半成品的价格由系统自动计算出)
        /// </summary>
        [Display(Name = "市场价格")]
        public decimal CurrentPrice { get; set; }

        /// <summary>
        /// 安全库存数
        /// </summary>
        [Display(Name = "安全库存")]
        public decimal SafeStorage { get; set; }

        /// <summary>
        /// 实际库存
        /// </summary>
        [Display(Name = "实际库存")]
        public decimal ActualSorage { get; set; }

        /// <summary>
        /// 是原材料，还是半成品
        /// </summary>
        [Display(Name = "品名类别")]
        public string Type { get; set; }

        /// <summary>
        /// 半成品所对应的原材料Id
        /// </summary>
        [Display(Name = "所属原材料")]
        public string RawMaterialId { get; set; }

        /// <summary>
        /// 半成品所对应的原材料名称
        /// </summary>
        [Display(Name = "所属原材料名称")]
        public string RawMaterialName { get; set; }

        /// <summary>
        /// 半成品所对应的原材料价格
        /// </summary>
        [Display(Name = "所属原材料的市场价格")]
        public decimal RawMaterialPrice { get; set; }

        /// <summary>
        /// 加工率，
        /// 加工率 = 切后重量 / 切前重量 
        /// </summary>
        [Display(Name = "加工率")]
        public decimal ProcessRate { get; set; }

        [Display(Name = "品名大类")]
        public string Category { get; set; }

        [Display(Name = "备注")]
        public string Remark { get; set; }
    }
}
